package ooday04;
//重写的演示
public class OverrideDemo {
}


//超类大，派生类小
class Coo{ //大
    void show(){}
    double test(){ return 0.0; }
    Doo say(){ return null; }
    Coo sayHi(){ return null; }
}
class Doo extends Coo{ //小
    //int show(){ return 1;} //编译错误，void时必须相等
    //int test(){ return 0; } //编译错误，基本类型时必须相等
    //Coo say(){ return null; } //编译错误，引用类型时必须小于或等于

    Doo sayHi(){ return null; }
}


















